package com.ck.mybatis.plus.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ck.mybatis.plus.entity.User;
import com.ck.mybatis.plus.entity.dto.UserDTO;
import com.ck.mybatis.plus.entity.dto.UserPageDTO;
import com.ck.mybatis.plus.entity.vo.UserPageVO;
import com.ck.mybatis.plus.entity.vo.UserVO;
import com.ck.mybatis.plus.model.CkPageInfo;

import java.util.List;

/**
 * @Classname UserService
 * @Description 用户接口
 * @Date 2020/7/11 13:59
 * @Created by lpc
 */
public interface UserService extends IService<User> {

    Long insert(UserDTO entityDTO);

    Boolean update(UserDTO entityDTO);

    Boolean delete(Long id);

    UserVO get(Long id);

    CkPageInfo<UserPageVO> page(UserPageDTO demoPageDTO);


    /**
     * 单表多个条件查询demo
     * @author lpc
     */
    CkPageInfo<UserPageVO> pageWhere(UserPageDTO demoPageDTO) throws Exception;

    /**
     * 多表联合多个条件查询demo
     * @param demoPageDTO
     * @return
     * @author lpc
     * @throws Exception
     */
    CkPageInfo<UserPageVO> pageJoinWhere(UserPageDTO demoPageDTO) throws Exception;
}
